import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

// import Order from "./"

// 路由配置：路径和组件的对应关系
// let routes = [...users,...books,...order,...school];
const routes = [
    // 首页
    {
        path:"/shouye",
        name:"shouye",
        component:()=>import("../views/shouye.vue")
    },
    // 动态
    {
        path:"/dongtai",
        name:"dongtai",
        component:()=>import("../views/dongtai.vue")
    },
    // 我的
    {
        path:"/wode",
        name:"wode",
        component:()=>import("../views/wode.vue")
    },
    {
        path:"/xiaoanlie",
        name:"xiaoanlie",
        component:()=>import("../views/xiaoanlie.vue")
    },
    {
        path:"/shezhi",
        name:"shezhi",
        component:()=>import("../views/shezhi.vue")
    },
    {
        path:"/",
        redirect:"/shouye"
    }
]

// 创建Vue-router对象
export default new VueRouter({
    mode:'history',
    routes
});
